{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 地理/逆地理编码\n",
    "> * 1、地理编码：将详细的结构化地址转换为高德经纬度坐标。且支持对地标性名胜景区、建筑物名称解析为高德经纬度坐标。\n",
    "结构化地址举例：北京市朝阳区阜通东大街6号转换后经纬度：116.480881,39.989410 \n",
    "地标性建筑举例：天安门转换后经纬度：116.397499,39.908722\n",
    "> * 2、逆地理编码：将经纬度转换为详细结构化的地址，且返回附近周边的POI、AOI信息。\n",
    "例如：116.480881,39.989410 转换地址描述后：北京市朝阳区阜通东大街6号\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 产品应用方案或场景\n",
    "* 用户现在**记不清具体的位置名称**（多年前去过or偶尔从他人口中听说）。但现在**需要准确地址**（比如寄收快递/邮件要填地址）--->通过逆地理编码和地理编码结合，返回更准确的地址。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 准备工作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests\n",
    "import json\n",
    "import pandas as pd\n",
    "key = 'cddee357dd2e2bb7bf9df9bc69652238'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 地理编码\n",
    "> * 1、url:https://restapi.amap.com/v3/geocode/geo?parameters      \n",
    "> * 2、请求方式：requests.get()       \n",
    "> * 3、参数：   \n",
    "\n",
    ">> * A.必选：key（高德API秘钥,需自己获取），address(结构化地址)  \n",
    ">> * B.可选：city（指定查询的城市），batch（批量查询控制）……详见[官方文档](https://lbs.amap.com/api/webservice/guide/api/georegeo)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 产品应用方案或场景\n",
    "* GPS定位\n",
    "* 做其他API功能的数据准备"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "def geocode_geo(key,address,city=None,batch=\"false\",sig=None,output=\"json\",callback=None):\n",
    "    \"\"\"获取高德地图API的地理编码：\n",
    "       将详细的结构化地址转换为高德经纬度坐标。\n",
    "       且支持对地标性名胜景区、建筑物名称解析为高德经纬度坐标。\"\"\"\n",
    "\n",
    "    url = 'https://restapi.amap.com/v3/geocode/geo?parameters'\n",
    "    params = {\n",
    "        \"key\":key,\n",
    "        \"address\":address,\n",
    "        \"city\":city,\n",
    "        \"batch\":batch,\n",
    "        \"sig\":sig,\n",
    "        \"output\":\"json\",\n",
    "        \"callback\":callback\n",
    "            }\n",
    "    r = requests.get(url,params=params)\n",
    "    result = r.json()['geocodes'][0]['location']\n",
    "    return result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.882933,22.557867'"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "geocode_geo(key,'广东省深圳市宝安区宝安体育馆')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 逆地理编码\n",
    "> * 1、url:\t\n",
    "https://restapi.amap.com/v3/geocode/regeo?parameters     \n",
    "> * 2、请求方式：requests.get()       \n",
    "> * 3、参数：   \n",
    "\n",
    ">> * A.必选：key（高德API秘钥,需自己获取），location(经纬度坐标)  \n",
    ">> * B.可选：poitype（返回附近POI类型），radius（搜索半径），extensions（返回结果控制）……详见[官方文档](https://lbs.amap.com/api/webservice/guide/api/georegeo)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 产品应用方案或场景\n",
    "* 当GPS定位到一个经纬度坐标时，通过逆地理编码得到**详细的结构化地址**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "def geocode_regeo(key,location,poitype=None,radius=1000,extensions=\"base\",batch=\"false\",roadlevel=None,sig=None,output=\"json\",callback=None,homeorcorp=0):\n",
    "    \"\"\"获得高德地图的逆地理编码：\n",
    "       将经纬度转换为详细结构化的地址\"\"\"\n",
    "\n",
    "    regeo_url = 'https://restapi.amap.com/v3/geocode/regeo?parameters'\n",
    "    params = {\n",
    "        \"key\":key,\n",
    "        \"location\":location,\n",
    "        \"poitype\":poitype,\n",
    "        \"radius\":radius,\n",
    "        \"extensions\":extensions,\n",
    "        \"batch\":batch,\n",
    "        \"roadlevel\":roadlevel,\n",
    "        \"sig\":sig,\n",
    "        \"output\":output,\n",
    "        \"callback\":callback,\n",
    "        \"homeorcorp\":homeorcorp\n",
    "        }\n",
    "    r = requests.get(regeo_url,params=params)\n",
    "    result = r.json()['regeocode']['formatted_address']\n",
    "    return result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'广东省深圳市宝安区新安街道宝安体育场'"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "geocode_regeo(key,'113.882933,22.557867')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 路径规划\n",
    "* 1.步行\n",
    "* 2.公交车\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 数据准备"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "walking_origin = '广东省深圳市南山区星海名城'\n",
    "walking_destination = '广东省深圳市南山区南头中学'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on function geocode_geo in module __main__:\n",
      "\n",
      "geocode_geo(key, address, city=None, batch='false', sig=None, output='json', callback=None)\n",
      "    获取高德地图API的地理编码：\n",
      "    将详细的结构化地址转换为高德经纬度坐标。\n",
      "    且支持对地标性名胜景区、建筑物名称解析为高德经纬度坐标。\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(geocode_geo)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 只需要写函数名\n",
    "origin = geocode_geo(key,walking_origin)\n",
    "destination = geocode_geo(key,walking_destination)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 步行\n",
    "> * 1、url:\t\n",
    "https://restapi.amap.com/v3/direction/walking?parameters    \n",
    "> * 2、请求方式：requests.get()       \n",
    "> * 3、参数：   \n",
    "\n",
    ">> * A.必选：key（高德API秘钥,需自己获取），origin(出发点)，destination（目的地）  \n",
    ">> * B.可选：……详见[官方文档](https://lbs.amap.com/api/webservice/guide/api/direction)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 产品应用方案或场景\n",
    "* 产品：专注于通过“走”减脂的应用\n",
    "    * 用户：不喜欢跑步 & 减脂的需求大于塑性的需求 & 工作忙碌时间少 & 住所附件没有合适的健身房 & ……\n",
    "        * 今天工作压力大？想走公园？-->返回经过公园的步行方案\n",
    "        * 今天周末？想顺便去商场？-->返回经过公园的步行方案\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "def direction_walking(key,origin,destination,sig=None,output=\"json\",callback=None):\n",
    "    \"\"\"获得高德的路径规划（步行）：\n",
    "       输入起始点与终止点即获得步行方案的动作指令\"\"\"\n",
    "    \n",
    "    walking_url = 'https://restapi.amap.com/v3/direction/walking?parameters'\n",
    "    params = {\n",
    "        \"key\":key,\n",
    "        \"origin\":origin,\n",
    "        \"destination\":destination,\n",
    "        \"sig\":sig,\n",
    "        \"output\":output,\n",
    "        \"callback\":callback\n",
    "   }\n",
    "    r = requests.get(walking_url ,params=params)\n",
    "    walk_msg = r.json()['route']['paths'][0]['steps']\n",
    "    for i in walk_msg: #先用for循环遍历出list其中所有元素（list中的每一个字典都算一个元素）\n",
    "        print(i.get('instruction'))\n",
    "       "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "向东南步行31米左转\n",
      "向北步行54米右转\n",
      "向东步行154米左转\n",
      "向北步行333米右转\n",
      "步行36米直行\n",
      "步行18米向左前方行走\n",
      "沿前海路向北步行40米右转\n",
      "沿深南大道向东步行16米向左前方行走\n",
      "步行232米直行\n",
      "步行98米左转\n",
      "沿南头文化街向西北步行13米向右前方行走\n",
      "向北步行142米到达目的地\n"
     ]
    }
   ],
   "source": [
    "direction_walking(key,origin,destination)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 公交车\n",
    "> * 1、url:\t\n",
    "https://restapi.amap.com/v3/direction/transit/integrated?parameters \n",
    "> * 2、请求方式：requests.get()       \n",
    "> * 3、参数：   \n",
    "\n",
    ">> * A.必选：key（高德API秘钥,需自己获取），origin(出发点)，destination（目的地），city（城市）  \n",
    ">> * B.可选：strategy（公交换乘策略）……详见[官方文档](https://lbs.amap.com/api/webservice/guide/api/direction)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 产品应用方案或场景\n",
    "* 应用于打车软件（反向思维）\n",
    "    * 用返回尽量多个公共交通方案（大多复杂，比如需要步行800m以上，或者转乘等）的方式，暗示用户选择打车"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 数据准备\n",
    "\n",
    "bus_origin = \"暨南大学\"\n",
    "bus_destination = \"广州塔\"\n",
    "origin = geocode_geo(key,bus_origin)\n",
    "destination = geocode_geo(key,bus_destination)\n",
    "city = \"广州\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "def direction_transit(key,origin,destination,city,cityd=None,extensions=\"base\",strategy=0,nightflag=0,date=None,time=None,sig=None,output=\"json\",callback=None):\n",
    "    \"\"\"获得高德的路径规划（公交车）：\n",
    "       输入起点、终点、所在城市（若跨城则需要分别输入起点与终点所在的城市）\n",
    "       即得到综合各类公共（火车、公交、地铁）交通方式的通勤方案\"\"\"\n",
    "    transit_url = 'https://restapi.amap.com/v3/direction/transit/integrated?parameters'\n",
    "    params = {\n",
    "        \"key\":key,\n",
    "        \"origin\":origin,\n",
    "        \"destination\":destination,\n",
    "        \"city\":\"广州\",\n",
    "        \"cityd\":cityd,\n",
    "        \"extensions\":extensions,\n",
    "        \"strategy\":strategy,\n",
    "        \"nightflag\":nightflag,\n",
    "        \"date\":date,\n",
    "        \"time\":time,\n",
    "        \"sig\":sig,\n",
    "        \"output\":output,\n",
    "        \"callback\":callback\n",
    "    }\n",
    "    \n",
    "    r = requests.get(transit_url ,params=params)\n",
    "    \n",
    "    count = r.json()[\"count\"] # 返回的方案数\n",
    "    for i in range(0,int(count)):\n",
    "        print(\"线路:\",i+1)\n",
    "        bus_name=r.json()[\"route\"][\"transits\"][i][\"segments\"][0][\"bus\"][\"buslines\"][0][\"name\"]\n",
    "         \n",
    "        print(\"公交车线路名称：\",bus_name)\n",
    "        walking_distance=r.json()[\"route\"][\"transits\"][i][\"walking_distance\"]\n",
    "\n",
    "        print(\"步行距离:\",walking_distance)\n",
    "        departure_stop=r.json()[\"route\"][\"transits\"][i][\"segments\"][0][\"bus\"][\"buslines\"][0][\"departure_stop\"][\"name\"]\n",
    "\n",
    "        print(\"起始站：\",departure_stop)\n",
    "        arrival_stop=r.json()[\"route\"][\"transits\"][i][\"segments\"][0][\"bus\"][\"buslines\"][0][\"arrival_stop\"][\"name\"]\n",
    "\n",
    "        print(\"终点站：\",arrival_stop)\n",
    "        print(\"-------------------------------------------\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "线路: 1\n",
      "公交车线路名称： 517路(黄埔客运站总站--广仁路总站)\n",
      "步行距离: 1276\n",
      "起始站： 华侨医院(潭村)\n",
      "终点站： 广仁路总站\n",
      "-------------------------------------------\n",
      "线路: 2\n",
      "公交车线路名称： 243路(员村总站--革新路总站)\n",
      "步行距离: 1364\n",
      "起始站： 华侨医院(潭村)站\n",
      "终点站： 中山五路\n",
      "-------------------------------------------\n",
      "线路: 3\n",
      "公交车线路名称： 地铁5号线(文冲--滘口)\n",
      "步行距离: 2573\n",
      "起始站： 潭村\n",
      "终点站： 杨箕\n",
      "-------------------------------------------\n",
      "线路: 4\n",
      "公交车线路名称： 245路(员村一横路总站--黄石东总站)\n",
      "步行距离: 1699\n",
      "起始站： 华侨医院(潭村)2站\n",
      "终点站： 天河\n",
      "-------------------------------------------\n",
      "线路: 5\n",
      "公交车线路名称： 261路(鱼珠总站--河沙总站)\n",
      "步行距离: 1402\n",
      "起始站： 国防大厦\n",
      "终点站： 中山纪念堂\n",
      "-------------------------------------------\n"
     ]
    }
   ],
   "source": [
    "direction_transit(key,origin,destination,city)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 行政区域查询\n",
    "> * 1、根据用户输入的搜索条件可以帮助用户快速的查找特定的行政区域信息。\n",
    "> * 2、url:\t\n",
    "https://restapi.amap.com/v3/config/district?parameters   \n",
    "> * 3、请求方式：requests.get()       \n",
    "> * 4、参数：   \n",
    "\n",
    ">> * A.必选：key（高德API秘钥,需自己获取）\n",
    ">> * B.可选：filter（根据区划过滤）……详见[官方文档](https://lbs.amap.com/api/webservice/guide/api/district)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 产品应用方案或场景\n",
    "* 既然某些app可以做到自动填写个人信息中的所在地，那么如有需要，也同样可以自动填写区域编码。\n",
    "    * 方案： \"输入关键字\"可以将省份信息关联到可视化的地图中。\n",
    "        * 用户通过点击中国地图里的省-->再点击省地图（自动跳转）中的市\n",
    "    * 优势：已经细化到需要输入区域编码的场景大多正式繁杂，除此之外还需要填写其他的很多信息，用户不免感到疲惫，转而使用点击简洁地图的方式可以放松用户情绪。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "def district(key,keywords,subdistrict=1,page=1,offset=20,extensions='base',filter=None,output=\"json\",callback=None):\n",
    "    \"\"\"获得高德的行政区域查询：\n",
    "       输入关键字，可以查找特定的行政区域信息。（比如搜索省份可显示市、区）\"\"\"\n",
    "    district_url = 'https://restapi.amap.com/v3/config/district?parameters'\n",
    "    params = {\n",
    "        \"key\":key,\n",
    "        \"keywords\":keywords,\n",
    "        \"subdistrict\":subdistrict,\n",
    "        \"page\":page,\n",
    "        \"offset\":offset,\n",
    "        \"extensions\":extensions,\n",
    "        \"filter\":filter,\n",
    "        \"callback\":callback,\n",
    "        \"output\":output     \n",
    "    }\n",
    "    r = requests.get(district_url,params=params)\n",
    "    print(pd.json_normalize(r.json()['districts'][0]['districts']))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "   citycode  adcode name                center level districts\n",
      "0      0754  440500  汕头市   116.708463,23.37102  city        []\n",
      "1      0757  440600  佛山市  113.122717,23.028762  city        []\n",
      "2      0758  441200  肇庆市  112.472529,23.051546  city        []\n",
      "3      0752  441300  惠州市  114.412599,23.079404  city        []\n",
      "4      0755  440300  深圳市     114.085947,22.547  city        []\n",
      "5      0759  440800  湛江市  110.364977,21.274898  city        []\n",
      "6      0756  440400  珠海市  113.553986,22.224979  city        []\n",
      "7      0768  445100  潮州市  116.632301,23.661701  city        []\n",
      "8      0668  440900  茂名市  110.919229,21.659751  city        []\n",
      "9      0750  440700  江门市  113.094942,22.590431  city        []\n",
      "10     0762  441600  河源市  114.697802,23.746266  city        []\n",
      "11     0766  445300  云浮市  112.044439,22.929801  city        []\n",
      "12     0660  441500  汕尾市  115.364238,22.774485  city        []\n",
      "13     0662  441700  阳江市  111.975107,21.859222  city        []\n",
      "14     0663  445200  揭阳市  116.355733,23.543778  city        []\n",
      "15     0753  441400  梅州市  116.117582,24.299112  city        []\n",
      "16      020  440100  广州市  113.280637,23.125178  city        []\n",
      "17     0751  440200  韶关市  113.591544,24.801322  city        []\n",
      "18     0763  441800  清远市  113.051227,23.685022  city        []\n",
      "19     0760  442000  中山市  113.382391,22.521113  city        []\n",
      "20     0769  441900  东莞市  113.746262,23.046237  city        []\n"
     ]
    }
   ],
   "source": [
    "district(key,'广东省')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##  搜索POI\n",
    "> * 1、提供多种查询POI信息的能力，其中包括关键字搜索、周边搜索、多边形搜索、ID查询四种筛选机制。\n",
    "> * 2、url:\t\n",
    "https://restapi.amap.com/v3/place/text?parameters  \n",
    "> * 3、请求方式：requests.get()       \n",
    "> * 4、参数：   \n",
    "\n",
    ">> * A.必选：key（高德API秘钥,需自己获取），keywords（查询关键字）和types（查询POI类型）二选一\n",
    ">> * B.可选：city（查询城市），children（层级展示），extensions（返回结果控制）……详见[官方文档](https://lbs.amap.com/api/webservice/guide/api/search)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 产品应用方案或场景\n",
    "* 推荐系统：\n",
    "    * 比如推荐评分最高的影院"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "def place(key,keywords,city,types=None,citylimit=\"false\",children=0,offset=20,page=1,extensions='all',sig=None,output=\"json\",callback=None):\n",
    "    \"\"\"获取高德搜索POI：\n",
    "       通过用POI的关键字进行条件搜索，例如：肯德基、朝阳公园等；同时支持设置POI类型搜索，例如：银行\"\"\"\n",
    "    place_url = 'https://restapi.amap.com/v3/place/text?parameters'\n",
    "    params = {\n",
    "        \"key\":key,\n",
    "        \"keywords\":keywords,\n",
    "        \"types\":types,\n",
    "        \"city\":city,\n",
    "        \"citylimit\":citylimit,\n",
    "        \"children\":children,\n",
    "        \"offset\":offset,\n",
    "        \"page\":page,\n",
    "        \"extensions\":extensions,  \n",
    "        \"sig\":sig,\n",
    "        \"output\":\"json\",\n",
    "        \"callback\":callback\n",
    "        }\n",
    "    r = requests.get(place_url,params=params)\n",
    "    count = r.json()[\"count\"]\n",
    "    for i in range(0,int(count)):\n",
    "        name = r.json()[\"pois\"][i]['name']\n",
    "        print(\"名称：\",name)\n",
    "        address = r.json()[\"pois\"][i]['address']\n",
    "        print(\"地址：\",address)\n",
    "        #parking_type = r.json()[\"pois\"][i]['parking_type']\n",
    "        biz_ext = r.json()[\"pois\"][i]['biz_ext']\n",
    "        print(\"有关信息：\",biz_ext)\n",
    "        print(\"______________________________________________________________\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "名称： 中影国际影城(欢乐海岸店)\n",
      "地址： 白石路东8号欢乐海岸曲水湾2栋A区\n",
      "有关信息： {'cost': [], 'seat_ordering': '0', 'rating': '4.5'}\n",
      "______________________________________________________________\n",
      "名称： 华夏艺术中心数码影院\n",
      "地址： 华侨城光侨街1号华夏艺术中心1-4层\n",
      "有关信息： {'cost': [], 'seat_ordering': '0', 'rating': '4.5'}\n",
      "______________________________________________________________\n",
      "名称： 太平洋影城(京基百纳店)\n",
      "地址： 白石路168号京基百纳广场3层\n",
      "有关信息： {'cost': [], 'seat_ordering': '0', 'rating': '5.0'}\n",
      "______________________________________________________________\n",
      "名称： 中影益田假日影城(深圳广场店)\n",
      "地址： 益田假日广场L3-8\n",
      "有关信息： {'cost': [], 'seat_ordering': '0', 'rating': '4.5'}\n",
      "______________________________________________________________\n",
      "名称： 中影UL城市影院(龙珠店)\n",
      "地址： 龙珠大道33号岁宝百货F2层\n",
      "有关信息： {'cost': [], 'seat_ordering': '0', 'rating': '4.0'}\n",
      "______________________________________________________________\n",
      "名称： 百老汇电影中心(深圳万象天地)\n",
      "地址： 深南大道与沙河西路交汇处深圳万象天地L5层\n",
      "有关信息： {'cost': [], 'seat_ordering': '0', 'rating': '5.0'}\n",
      "______________________________________________________________\n",
      "名称： 华谊兄弟影院(方大城店)\n",
      "地址： 桃源街道龙珠四路2号方大广场3层\n",
      "有关信息： {'cost': [], 'seat_ordering': '0', 'rating': '4.5'}\n",
      "______________________________________________________________\n",
      "名称： 深圳纵横时光道影城(侨城坊店)\n",
      "地址： 侨城坊QPlexB座4楼\n",
      "有关信息： {'cost': [], 'rating': '4.5'}\n",
      "______________________________________________________________\n",
      "名称： 极光点播影院(世界之窗店)\n",
      "地址： 沙河世纪假日广场B座1层12号\n",
      "有关信息： {'cost': [], 'seat_ordering': '0', 'rating': '5.0'}\n",
      "______________________________________________________________\n",
      "名称： 传奇影城(塘朗店)\n",
      "地址： 留仙大道塘朗地铁站A出口塘朗城广场L3\n",
      "有关信息： {'cost': [], 'rating': '4.0'}\n",
      "______________________________________________________________\n",
      "名称： 万象影城(深圳湾万象城旗舰店)\n",
      "地址： 科苑南路2888号华润深圳湾万象城L316\n",
      "有关信息： {'cost': [], 'seat_ordering': '0', 'rating': '5.0'}\n",
      "______________________________________________________________\n",
      "名称： 中影荟星国际影城(西丽店)\n",
      "地址： 留仙大道1369号众冠西郡园二楼(地铁站C出口女人世界二楼)\n",
      "有关信息： {'cost': '30.00', 'seat_ordering': '0', 'rating': '4.0'}\n",
      "______________________________________________________________\n",
      "名称： 中影4KMAX国际影城(西丽店)\n",
      "地址： 留仙大道2188号悦方广场1层\n",
      "有关信息： {'cost': '40.00', 'seat_ordering': '0', 'rating': '4.0'}\n",
      "______________________________________________________________\n",
      "名称： 中影UL城市影院(西丽店)\n",
      "地址： 西丽镇366商业步行街中段2层\n",
      "有关信息： {'cost': '43.00', 'seat_ordering': '0', 'rating': '3.5'}\n",
      "______________________________________________________________\n",
      "名称： 保利国际影城(文心五路店)\n",
      "地址： 文心五路33号\n",
      "有关信息： {'cost': [], 'seat_ordering': '0', 'rating': '5.0'}\n",
      "______________________________________________________________\n",
      "名称： 中影南方影城(科技园店)\n",
      "地址： 深南大道深大地铁站A3出口科技园文化广场3楼\n",
      "有关信息： {'cost': '31.00', 'seat_ordering': '0', 'rating': '4.0'}\n",
      "______________________________________________________________\n",
      "名称： 纵横国际影城(西丽店)\n",
      "地址： 西丽留仙大道4168号益田假日里4层\n",
      "有关信息： {'cost': [], 'seat_ordering': '0', 'rating': '4.0'}\n",
      "______________________________________________________________\n",
      "名称： 海岸影城(海岸城店)\n",
      "地址： 文心五路33号海岸城3层301号\n",
      "有关信息： {'cost': [], 'seat_ordering': '0', 'rating': '4.5'}\n",
      "______________________________________________________________\n",
      "名称： 华谊兄弟影院(深圳店)\n",
      "地址： 深圳湾中心路宝能太古城北区B1层B132\n",
      "有关信息： {'cost': '31.00', 'seat_ordering': '0', 'rating': '4.5'}\n",
      "______________________________________________________________\n",
      "名称： 中影星美国际影城南山云城店\n",
      "地址： 西丽街道云城万科里购物中心五楼电影院\n",
      "有关信息： {'cost': [], 'seat_ordering': '0', 'rating': '4.5'}\n",
      "______________________________________________________________\n"
     ]
    },
    {
     "ename": "IndexError",
     "evalue": "list index out of range",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mIndexError\u001b[0m                                Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-27-f2b900b704e1>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mplace\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'电影院'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mcity\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m\"440305\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;32m<ipython-input-26-7ddf02e50ae4>\u001b[0m in \u001b[0;36mplace\u001b[1;34m(key, keywords, city, types, citylimit, children, offset, page, extensions, sig, output, callback)\u001b[0m\n\u001b[0;32m     20\u001b[0m     \u001b[0mcount\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mr\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mjson\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"count\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     21\u001b[0m     \u001b[1;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mcount\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 22\u001b[1;33m         \u001b[0mname\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mr\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mjson\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"pois\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mi\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'name'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     23\u001b[0m         \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"名称：\"\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     24\u001b[0m         \u001b[0maddress\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mr\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mjson\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"pois\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mi\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'address'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mIndexError\u001b[0m: list index out of range"
     ]
    }
   ],
   "source": [
    "place(key,'电影院',city=\"440305\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## IP定位\n",
    "> * 1、根据用户输入的IP地址，能够快速的帮用户定位IP的所在位置。\n",
    "> * 2、url:\t\n",
    "https://restapi.amap.com/v3/ip?parameters\n",
    "> * 3、请求方式：requests.get()       \n",
    "> * 4、参数：   \n",
    "\n",
    ">> * A.必选：key（高德API秘钥,需自己获取）\n",
    ">> * B.可选：ip（ip地址）……详见[官方文档](https://lbs.amap.com/api/webservice/guide/api/ipconfig)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 产品应用方案或场景\n",
    "* 若检测到用户在搜索引擎上搜索‘IP’\n",
    "    * ---->在页面上方显示出‘点击即显示本机IP’和‘输入IP查询该IP地址的所在地’"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "def IP(key,ip=None,sig=None,output=\"json\"):\n",
    "    \"\"\"获得高德的IP定位：\n",
    "       根据用户输入的IP地址，能够快速的帮用户定位IP的所在位置。\n",
    "       若用户不填写IP，则取客户http之中的请求来进行定位\"\"\"\n",
    "    ip_url = 'https://restapi.amap.com/v3/ip?parameters'\n",
    "    params = {\n",
    "        \"key\":key,\n",
    "        \"ip\":ip, \n",
    "        \"sig\":sig,\n",
    "        \"output\":\"json\",\n",
    "\n",
    "    }\n",
    "    r = requests.get(ip_url,params=params)\n",
    "    province = r.json()['province']\n",
    "    city = r.json()['city']\n",
    "\n",
    "    print(\"IP地址所在地:\",province,city)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "IP地址所在地: 广东省 广州市\n"
     ]
    }
   ],
   "source": [
    "IP(key)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 批量请求接口\n",
    "> * 1、批量接口通过用户传入合并后的请求，同时返回多个请求的顺序集合，目前最多支持20个子请求。 返回的顺序与子请求的顺序一致。\n",
    "> * 2、url:\t\n",
    "https://restapi.amap.com/v3/batch?parameters\n",
    "> * 3、请求方式：requests.get()       \n",
    "> * 4、参数：   \n",
    "\n",
    ">> * A.必选：key（高德API秘钥,需自己获取）\n",
    ">> * B.可选：）……详见[官方文档](https://lbs.amap.com/api/webservice/guide/api/batchrequest)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 产品应用方案或场景\n",
    "* 用户：懒\n",
    "* 通过用户传入合并后的请求，同时返回多个请求的顺序集合"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 数据准备：\n",
    "import requests\n",
    "import json\n",
    "key = 'cddee357dd2e2bb7bf9df9bc69652238'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.679287,23.632575'"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = \"广东省广州市中山大学南方学院\"\n",
    "y = geocode_geo(key,x)\n",
    "y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "def batch():\n",
    "    \"\"\"获得高德API的批量请求接口：\n",
    "       批量接口通过用户传入合并后的请求，同时返回多个请求的顺序集合，目前最多支持20个子请求。 返回的顺序与子请求的顺序一致。\"\"\"\n",
    "    batch_url = 'https://restapi.amap.com/v3/batch?parameters'\n",
    "   \n",
    "    params = {\n",
    "        \"key\":key\n",
    "    }\n",
    "    body = {\n",
    "        \n",
    "        \"ops\": [\n",
    "            {\n",
    "                \"url\": \"/v3/place/around?offset=10&page=1&key='cddee357dd2e2bb7bf9df9bc69652238'&location=116.50394379585519,39.278209477408794&output=json&radius=100000&types=080000\"\n",
    "            },\n",
    "            {\n",
    "                \"url\": \"/v3/place/around?offset=10&page=1&key='cddee357dd2e2bb7bf9df9bc69652238'&location=118.50394379585519,39.278209477408794&output=json&radius=100000&types=080000\"\n",
    "            }\n",
    "        ]\n",
    "    }\n",
    "   \n",
    "    \n",
    "    r = requests.get(batch_url,params=params,json=body)\n",
    "    result = r.json()\n",
    "    return result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'status': 200,\n",
       "  'body': {'status': '0', 'info': 'INVALID_USER_KEY', 'infocode': '10001'},\n",
       "  'header': {'gsid': '033015147110160536403256700012522116418',\n",
       "   'Content-Type': 'application/json',\n",
       "   'Access-Control-Allow-Methods': '*',\n",
       "   'Access-Control-Allow-Origin': '*',\n",
       "   'sc': '0.001',\n",
       "   'Content-Length': 59,\n",
       "   'Access-Control-Allow-Headers': 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,key,x-biz,x-info,platinfo,encr,enginever,gzipped,poiid'}},\n",
       " {'status': 200,\n",
       "  'body': {'status': '0', 'info': 'INVALID_USER_KEY', 'infocode': '10001'},\n",
       "  'header': {'gsid': '033015147110160536403256700012522116418',\n",
       "   'Content-Type': 'application/json',\n",
       "   'Access-Control-Allow-Methods': '*',\n",
       "   'Access-Control-Allow-Origin': '*',\n",
       "   'sc': '0.000',\n",
       "   'Content-Length': 59,\n",
       "   'Access-Control-Allow-Headers': 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,key,x-biz,x-info,platinfo,encr,enginever,gzipped,poiid'}}]"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "batch()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 静态地图\n",
    "> * 1、静态地图服务通过返回一张地图图片响应HTTP请求，使用户能够将高德地图以图片形式嵌入自己的网页中。用户可以指定请求的地图位置、图片大小、以及在地图上添加覆盖物，如标签、标注、折线、多边形。\n",
    "> * 2、url:\t\n",
    "https://restapi.amap.com/v3/staticmap?parameters\n",
    "> * 3、请求方式：requests.get()       \n",
    "> * 4、参数：   \n",
    "\n",
    ">> * A.必选：key（高德API秘钥,需自己获取）,location(地图中心点,location为经纬度信息，经纬度之间使用\",\"分隔，不同的点使用\";\"分隔。),zoom(地图级别:[1:17])\n",
    ">> * B.可选：）……详见[官方文档](https://lbs.amap.com/api/webservice/guide/api/staticmaps)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 产品应用方案或场景\n",
    "* 如果我的网站与地理位置有关--->以图片形式嵌入自己的网页中"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 数据准备：\n",
    "from PIL import Image\n",
    "from io import BytesIO\n",
    "import requests\n",
    "import json\n",
    "key = 'cddee357dd2e2bb7bf9df9bc69652238'\n",
    "point = '广东省深圳市南山区星海名城'\n",
    "location = geocode_geo(key,point)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "def staticmap(key,location,zoom,size=\"400*400\",markers=None,labels=None,paths=None,traffic=0,sig=None): \n",
    "    \"\"\"获得高德的静态地图：\n",
    "          输入key、地图中心点坐标、地图级别\n",
    "          使用户能够将高德地图以图片形式嵌入自己的网页中\n",
    "          用户还可以指定请求的地图位置、图片大小、以及在地图上添加覆盖物，如标签、标注、折线、多边形。\"\"\"\n",
    "        \n",
    "    url='https://restapi.amap.com/v3/staticmap?parameters'\n",
    "    params={\n",
    "        \"key\":key,\n",
    "        \"location\":location,\n",
    "        \"zoom\":zoom,\n",
    "        \"size\":size,\n",
    "        \"markers\":markers,\n",
    "        \"labels\":labels,\n",
    "        \"paths\":paths,\n",
    "        \"traffic\":traffic,\n",
    "        \"sig\":sig\n",
    "    }\n",
    "    r =  requests.get(url,params=params)\n",
    "    results = Image.open(BytesIO(r.content)) \n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAADAFBMVEXHx8bw/Ojt6eOMaNzy8vL29/Tu6+bw7uj3+fTb29rh5eSqq6u6u7uqqqmVlJL+/Pzi3tWx17Ls7fTr8PX29/Srqqmop6O0tLPGxcTiaGiam5qIg9fAwrqcnJu7urq8u7jj39jt6+fFxMDx7+nd3Nn77+qzs7Lf2tDv7Obf3fZkY2LGx8Xu7OfCwb+Uk5DV1NDlwZP8+/67vbaanJyAf37E0MBsbGpPT05JSUf5+PfZf1G+v8Ccnp+CgYGsrrBwcnPy8e+I1W/d2dHf3tr6+eykpqesrKy/vr349/PNzs/QzsyVu5Gmp6jppzmvrqysrq+wsK+jpac1NDOEhoj28+3Pz8+fnpz09vIjIyKbmpaVmJq3ubUUFBOho6Vub3J5gZxoaGeHhoXb2dVRq98rKypeX1+/zfDYoVjKy8vy8ey8vr/bq2fn5N719vjv7unk4dyYl5VZv1Tv7+2IiovW1tV9fX9SU1NBQUBXWFrt7u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cOAuv4ZTfj93+nSh8DnXLRTc0unTPyqh/7s/QgDYXxqufA2Tp90b10dGqce1pdzOFfuaNk+RLNuSArA6GyBsISSYQ9DQPx5wyJu/+OUvv/+NAgLkRzf9xTXX3bL6mmvWby+cfuHv3vjmeau3X3NdobD8tcKFgze+8uc/On3j/F8vXb169c6frURy60vTAUieY+RdP5zBQvMZTr1VISJ/6FYQjRMUg+oDFe5EnybXxqLpzxC9/NJL3zj/e7/45eu//MVc1AlkeH36zjvv/M0dd05dcOX9133lyXN/85OHf9L+TWvNVy99cN4l8+f/bO3Xf7J91z0XLr3w2avm/SlWJafdiz791g8RxOd9+g307M+i3/A76I/X6G9Xvub/4Qbfof8O3PBVRDcciDRaJQ1Y3ucy2R0GgrJP+QoES6hKLSbXY2f1vJDaqNcuwNJO3Sb7FAbka3/zN/Dll/43ggPh8cvv/d9f+xoC5Lfb/3HruYi2Xvpl6++2X7nyL+7a3nLThYPX3bN6zQVN771VmF/89K7td135xvZ7Xlv7U6JKDt92wT03f/70w/PuuPtS9/OXvDbvhrtvcS+5++7Puu5d97ivzbv77rfO+zuX/HHJzYg+i7974Ct3332dexP+3P27m8JNzpfgyPYlc5t5kfOuPeIpROZ5mdv9or47tcYOh/ODKU0udjk+HPqP737j//veL39J+OOXb37j1P+BRJbz4F3N5yG6deNffe7rv37v0u13Xte++p7TpfbXCpcMffmtr/9mcM03b7z1uV13rf7upiLGY8Ntx2r1Aw9/+WHXveJu96vPXnin+93brnn49Ofvdh++7R73ua+4V9/s3nAF+QPR5x8m3931M/eNm92bbsYccnMYENUzySQDQFGgsoSrNd/gNUWuPhlrkYYqYcEU+meTQwF592OIOTw8kAr571iHOD9GEus3SGZdMnj/z+ZZV268cOeFl95SKPzmisKdz7z4HALk01tvvHDjhS1rzt342ocIkBfuwaxrX33bXUhi/fXd7r+94T5w229Wu+7d333twXvcK2/4/IUPu//zPRf/4bqv3XD1/8TfXdDiurft+uyBVYjOu/KvubaqL5eIB4DgEezWq07HMi/NM6E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F3/vFm5j+NLZCkh7cokPt25ev/Uz01sPPSRv03e9+N/gjnwKhp0NI8xiDE9RzJgTTgnF2YnvVVQk205t++1t802+HPnfOyy+9/O3Kj77wZ+djPM53xIB8+GESIt6TPe6rnPKlNC0aSSqB/FCtcfnwoPyRvDzh2///kN0GplF3Uoc6eUO4GiTknHMPEGeocs7L33qp+qP/8SV4DsbjfhkeiUwS6y2R4cWgOIHy6p2OxIqFWWnE5B9SXsHSZM1qxrxlmzyBBmMSW6iuSio+IM79/3nhwoVD5tDQ1+ae/69/+ls5HkmIBE31l2DQ/CtCjqYDkWhn+dNTkt6Qe1NclRlrqQytLLcYIISSYODoSzJE+EEx/sETXPjH+4ig0jAFZFflEISKxkX7SiMm5XTdYNfLnFui3jKfiMn7v8jr06eNIiQIEI7SHxuMSBrVJph5SfDwENFY4FY7RT6uQSps4qq8wm+jertC7xH7hCJCcmsZrtSbXKkwGRB5wpoC3jYJHpEp+D6CBL6vKbSky4VempD4+GvPpPi2epEHBklFK9GMep7px3xx5NWyTkTk/wcKRUefNVq2HQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<PIL.PngImagePlugin.PngImageFile image mode=P size=400x400 at 0x17BB5048F40>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "staticmap(key,location,17)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 坐标转换\n",
    "> * 1、能够将用户输入的非高德坐标（GPS坐标、mapbar坐标、baidu坐标）转换成高德坐标。\n",
    "> * 2、url:\t\n",
    "https://restapi.amap.com/v3/assistant/coordinate/convert?parameters\n",
    "> * 3、请求方式：requests.get()       \n",
    "> * 4、参数：   \n",
    "\n",
    ">> * A.必选：key（高德API秘钥,需自己获取）,location(经纬度信息)\n",
    ">> * B.可选：）……详见[官方文档](https://lbs.amap.com/api/webservice/guide/api/convert)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 产品应用方案或场景\n",
    "* 转换坐标\n",
    "    * 可能不是在高德的环境中运用，为了使用高德的功能需要将数据中非高德坐标转化为高德坐标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "已知的高德坐标(用于验证)： 113.912749,22.537620\n",
      "网络查询到的百度坐标： 113.919214,22.543933\n"
     ]
    }
   ],
   "source": [
    "# 数据准备：\n",
    "import requests\n",
    "import json\n",
    "key = 'cddee357dd2e2bb7bf9df9bc69652238'\n",
    "point = '广东省深圳市南山区星海名城'\n",
    "location = geocode_geo(key,point)\n",
    "print(\"已知的高德坐标(用于验证)：\",location) \n",
    "baidu_location= '113.919214,22.543933'\n",
    "print(\"网络查询到的百度坐标：\",baidu_location)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [],
   "source": [
    "def coordinate(key,locations,coordsys=\"autonavi\",sig=None,output=\"json\"):\n",
    "    \"\"\"获得高德的坐标转化：\n",
    "       将用户输入的非高德坐标（GPS坐标、mapbar坐标、baidu坐标）转换成高德坐标。\"\"\"\n",
    "    \n",
    "    convert_url = 'https://restapi.amap.com/v3/assistant/coordinate/convert?parameters'\n",
    "    params = {\n",
    "        \"key\":key,\n",
    "        \"locations\":locations,\n",
    "        \"coordsys\":coordsys,\n",
    "        \"sig\":sig,\n",
    "        \"output\":output\n",
    "\n",
    "    }\n",
    "    r = requests.get(convert_url,params=params)\n",
    "    result = r.json()['locations']\n",
    "    return result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.919214,22.543933'"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "coordinate(key,baidu_location)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 天气查询\n",
    "> * 1、根据用户输入的adcode，查询目标区域当前/未来的天气情况。\n",
    "> * 2、url:\t\n",
    "https://restapi.amap.com/v3/weather/weatherInfo?parameters\n",
    "> * 3、请求方式：requests.get()       \n",
    "> * 4、参数：   \n",
    "\n",
    ">> * A.必选：key（高德API秘钥,需自己获取）,city（城市编码）\n",
    ">> * B.可选：extensions（可选值：base/all，base:返回实况天气，all:返回预报天气）……详见[官方文档](https://lbs.amap.com/api/webservice/guide/api/convert)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 产品应用方案或场景\n",
    "* 天气预报\n",
    "* 穿衣提醒\n",
    "    * 比如今天温度（'temperature': '24',）虽然不高，但刮东北风or风力较大（'winddirection': '东北','windpower': '4',）---->推荐穿风衣或是抗风的外套\n",
    "* 物联智能家居\n",
    "    * 比如今天空气湿度（'humidity'）低，开启加湿器"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [],
   "source": [
    "def weatherInfo(key,city,extensions=None,output=\"json\"):\n",
    "    \"\"\"获取高德的天气查询：\n",
    "       根据用户输入的adcode，查询目标区域当前/未来的天气情况。\"\"\"\n",
    "    \n",
    "    weatherInfo_url = 'https://restapi.amap.com/v3/weather/weatherInfo?parameters'\n",
    "    params = {\n",
    "        \"key\":key,\n",
    "        \"city\":city,\n",
    "        \"extensions\":extensions,\n",
    "        \"output\":output\n",
    "       \n",
    "    }\n",
    "    r = requests.get(weatherInfo_url,params=params)\n",
    "    result = r.json()['lives']\n",
    "    return result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'province': '广东',\n",
       "  'city': '深圳市',\n",
       "  'adcode': '440300',\n",
       "  'weather': '多云',\n",
       "  'temperature': '24',\n",
       "  'winddirection': '东北',\n",
       "  'windpower': '4',\n",
       "  'humidity': '52',\n",
       "  'reporttime': '2020-11-08 09:22:22'}]"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "weatherInfo(key,440300)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 输入提示\n",
    "> * 1、提供根据用户输入的关键词查询返回建议列表。\n",
    "> * 2、url:\t\n",
    "https://restapi.amap.com/v3/assistant/inputtips?parameters\n",
    "> * 3、请求方式：requests.get()       \n",
    "> * 4、参数：   \n",
    "\n",
    ">> * A.必选：key（高德API秘钥,需自己获取）,keywords(查询关键词)\n",
    ">> * B.可选：type(可支持传入多个分类，多个类型剑用“|”分隔),location(坐标)……详见[官方文档](https://lbs.amap.com/api/webservice/guide/api/inputtips)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 产品应用方案或场景\n",
    "* 用户有明确的目的地\n",
    "    * 想去的那家餐厅订完啦？--->换一家！\n",
    "    * 想要的那款NIKE没货啦？--->换一家！\n",
    "    * ………………"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.912749,22.537620'"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 数据准备：\n",
    "import requests\n",
    "import json\n",
    "key = 'cddee357dd2e2bb7bf9df9bc69652238'\n",
    "point = '广东省深圳市南山区星海名城'\n",
    "location = geocode_geo(key,point)\n",
    "location"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [],
   "source": [
    "def inputtips(key,keywords,type,location=None,city=None,citylimit='false',datatype=\"all\",sig=None,output=\"json\",callback=None):\n",
    "    \"\"\"获得高德的输入提示：\n",
    "       提供根据用户输入的关键词查询返回建议列表\"\"\"\n",
    "    \n",
    "    inputtips_url = 'https://restapi.amap.com/v3/assistant/inputtips?parameters'\n",
    "    params = {\n",
    "        \"key\":key,\n",
    "        \"keywords\":keywords,\n",
    "        \"type\":type,\n",
    "        \"location\":location,\n",
    "        \"city\":city,\n",
    "        \"citylimit\":citylimit,\n",
    "        \"datatype\":datatype,\n",
    "        \"sig\":sig,\n",
    "        \"output\":output,\n",
    "        \"callback\":callback\n",
    "\n",
    "    }\n",
    "    r = requests.get(inputtips_url,params=params)\n",
    "    # 得出列表中有几个元素\n",
    "    num_list = len(r.json()['tips'])\n",
    "    # 遍历出列表嵌套的每个字典里的同名信息\n",
    "    for i in range(1,num_list):\n",
    "        name_msg = r.json()['tips'][i]['name']\n",
    "        address_msg = r.json()['tips'][i]['address']\n",
    "        print(name_msg)\n",
    "        print(address_msg)\n",
    "        print(\"--------------------------------\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "肯德基(大新店)\n",
      "桃园路与前海路交汇处大新村,大新前海商业中心1-2F\n",
      "--------------------------------\n",
      "肯德基(新鸿洲店)\n",
      "南新路3179号\n",
      "--------------------------------\n",
      "肯德基(桃园店)\n",
      "常兴路131号南景苑1楼\n",
      "--------------------------------\n",
      "肯德基(麒麟餐厅)\n",
      "艺园路东缤纷年华小区裙楼1层\n",
      "--------------------------------\n",
      "肯德基(海雅百货)\n",
      "南海大道南山商业文化中心区海雅百货2层\n",
      "--------------------------------\n",
      "肯德基(香缤广场店)\n",
      "建安一路86-2号香槟广场1层\n",
      "--------------------------------\n",
      "肯德基(科苑店)\n",
      "科兴路10号汇景豪苑301(1F-08B)\n",
      "--------------------------------\n",
      "肯德基(天虹商场宝安创业餐厅)\n",
      "翻身路117号富源商贸中心大厦1层\n",
      "--------------------------------\n",
      "肯德基(高新区店)\n",
      "科苑大道高新区综合服务楼1层\n",
      "--------------------------------\n"
     ]
    }
   ],
   "source": [
    "inputtips(key,\"肯德基\",\"餐厅\",location)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 地理围栏\n",
    "> * 提供在服务端，增删改查地理围栏的功能，同时支持对于设备与围栏关系进行监控。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 创建地理围栏\n",
    "> * 1、url:\t\n",
    "https://restapi.amap.com/v4/geofence/meta?parameters\n",
    "> * 2、请求方式：requests.post()       \n",
    "> * 3、参数：   \n",
    "\n",
    ">> * A.必选：key（高德API秘钥,需自己获取）,name(围栏名称),center,radius\n",
    ">> * B.可选：……详见[官方文档](https://lbs.amap.com/api/webservice/guide/api/geofence_service)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'geocode' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-51-f4d9e70db71f>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      4\u001b[0m \u001b[0mkey\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m'cddee357dd2e2bb7bf9df9bc69652238'\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      5\u001b[0m \u001b[0mpoint\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m'广东省深圳市南山区星海名城'\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 6\u001b[1;33m \u001b[0mlocation\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mgeocode\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mpoint\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      7\u001b[0m \u001b[0mlocation\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mNameError\u001b[0m: name 'geocode' is not defined"
     ]
    }
   ],
   "source": [
    "# 数据准备\n",
    "import requests\n",
    "import json\n",
    "key = 'cddee357dd2e2bb7bf9df9bc69652238'\n",
    "point = '广东省深圳市南山区星海名城'\n",
    "location = geocode(key,point)\n",
    "location"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<Response [200]>\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'data': {'message': '必选参数name不存在', 'status': '141'},\n",
       " 'errcode': 0,\n",
       " 'errdetail': None,\n",
       " 'errmsg': 'OK',\n",
       " 'ext': None}"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "geofence_url = 'https://restapi.amap.com/v4/geofence/meta?parameters'\n",
    "\n",
    "headers = {\n",
    "   \"Content-Type\": \"application/json; charset=UTF-8\"\n",
    "}\n",
    "params = {\n",
    "    \"key\":key,\n",
    "    \"name\": \"aaa111啊啊啊\",\n",
    "    \"center\": \"113.912749,22.537620\",\n",
    "    \"radius\": \"1000\",\n",
    "    \"enable\": \"true\",\n",
    "    \"valid_time\": \"2020-01-30\",\n",
    "    \"repeat\": \"Mon,Tues,Wed,Thur,Fri,Sat,Sun\",\n",
    "    \"time\": \"00:00,11:59;13:00,20:59\",\n",
    "    \"desc\": \"测试围栏描述\",\n",
    "    \"alert_condition\": \"enter;leave\"\n",
    "}\n",
    "\n",
    "r = requests.post(geofence_url,headers=headers,params=params,json={\"url\": geofence_url})\n",
    "print(r)\n",
    "r.json()\n",
    "#json.dumps(r.json())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 轨迹纠偏"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "164.956px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
